#@layout()
<script>
    $("#dictionary-add").validate({
        rules:{
        
        
                "dictionary.name":{
                    required:true
                },
        
        
                "dictionary.status":{
                    required:true
                },
        
        
                "dictionary.remark":{
                    required:true
                },
        
        
                "dictionary.pid":{
                    required:true
                },
        
        
                "dictionary.code":{
                    required:true
                }
        
        },
        messages:{

        
        
                "blog.name":{
                required:"请输入数据字典名称..."
                },
        
        
                "blog.status":{
                required:"请输入数据字段状态..."
                },
        
        
                "blog.remark":{
                required:"请输入数据字典备注信息..."
                },
        
        
                "blog.pid":{
                required:"请输入父节点ID..."
                },
        
        
                "blog.code":{
                required:"请输入数字字典的code值..."
                }
        
        },
        onkeyup:false,
        focusCleanup:true,
        success:"valid",
        submitHandler:function(form){
        var config = {
        "url":"/admin/dictionary/doAdd",
        data:$("#dictionary-add").serialize(),
        "method":"POST"
        };
        var backendTool = new BackendTool(config);
        backendTool.ajaxRequest();
        }
    });
</script>
#define main()
     <form class="form form-horizontal" id="dictionary-add">
        #include("dictionary-form.html")
     </form>
#end